package com.ll.module_translate.room

import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.fenghuajueli.libbasecoreui.BaseApplication
import com.ll.module_translate.entity.TransResult

/**
 * @Author: ll
 * @CreateTime: 2021/11/01 16:54
 */
@Database(entities = [TransResult::class],version = 1,exportSchema = false)
abstract class TransDb : RoomDatabase(){
    abstract fun dao():TransDao

    companion object{
        val instance by lazy {
           Room.databaseBuilder(BaseApplication.getApplication(),TransDb::class.java,"translate.db")
               .build()
        }
    }
}